<style>
.checkoutform table {background: #fff;}
.label-block{ width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer;}
.line-block{ display:inline-block;}
.bg-gray{ background-color:#fafafa;}
</style>
<form class="checkoutform" action="{:U('update')}" method="post">
  <input name="role_id" type="hidden" value="{$role.id}" />
  <table class="" width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
    <volist name="all_node" id="vo">
      <tr>
        <td align="center" class="hidden">
        	<div class="icheck">
                <div class="minimal-green single-row">
                  <input checked="checked" type="checkbox" name="node_id[]" id="node_id[]" class="sall" value="{$vo.id}_{$vo.level}" />
                  <label class=" label-block">{$vo.title}</label>
                </div>
            </div>
        </td>
        <td style="border-width:0; padding:0;">
        	<table class="table table-access table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:0;">
                <volist name="vo['sub']" id="svo" key="i">
                  <tr class="group-check">
                    <td class="bg-gray " align="left" width="140">
                        <div class="icheck main-check">
                            <div class="minimal-green single-row"> 
                                <input type="checkbox" <eq name="svo['role_id']" value="$role['id']">checked="checked"</eq>
                                name="node_id[]" id="node_id['{$i}']['0']" class="sall" value="{$svo.id}_{$svo.level}" num="{$i}" />
                                <label for="node_id['{$i}']['0']" class="label-block">{$svo.title}</label>
                            </div>
                        </div>
                    </td>
                    <td>
                        <volist name="svo['sub']" id="ssvo" key="k">
                            <div class="icheck line-block normal-check">
                              <div class="minimal-green  single-row"> <input type="checkbox"
                                <eq name="ssvo['role_id']" value="$role['id']">checked="checked"</eq>
                                name="node_id[]" id="node_id['{$i}']['{$k}']" class="sall" value="{$ssvo.id}_{$ssvo.level}" />
                                <label title="{$ssvo.title}" class="label-block" for="node_id['{$i}']['{$k}']">{$ssvo.title}</label>
                              </div>
                            </div>
                        </volist>
                    </td>
                  </tr>
                </volist>
            </table>
        </td>
      </tr>
    </volist>
  </table>
</form>
<script>
//全选的方法
$(".main-check input").on('ifChecked',function(e){
	$(this).parents('.group-check').find('.normal-check input').iCheck('check');
}).on('ifUnchecked',function(e){
	$(this).parents('.group-check').find('.normal-check input').iCheck('uncheck');
});
//渲染ICHECK
$('.aui_state_focus  .minimal-green input').iCheck({
	checkboxClass: 'icheckbox_minimal-green',
	radioClass: 'iradio_minimal-green',
	increaseArea: '20%' // optional
});
</script>
